<!--
* @FileDescription: 购物车
* @Author: 作者信息
* @Date: 文件创建时间
* @LastEditors: 
* @LastEditTime: 最后更新时间
-->


<template>
	<view>
		<!-- <common-car :list="goodsProducts" @next="toNext" @toBuy="toBuyGoods"></common-car> -->
		<!-- 购物车列表 -->
		<view class="cart">
			<view class="list" v-for="(item,index) in 3">
				<view class="left">
					<image src="../../static/xuanzhong.png" mode=""></image>
					<!-- <image src="../../static/weixuanzhong.png" mode=""></image> -->
				</view>
				<view class="right">
					<view class="image">
						<image src="../../static/black.jpg" mode=""></image>
					</view>
					<view class="information">
						<view class="name">我是名字</view>
						<view class="spec">我是规格日期</view>
						<view class="price">￥6.80</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 全选结算 -->
		<view class="bottom">
			<view class="left">
				<view class="image">
					<image src="../../static/weixuanzhong.png" mode=""></image>
				</view>
				<view class="">
					全选
				</view>
			</view>

			<view class="right">
				<view class="total">
					合计： <text>￥0.00</text>
				</view>
				<view class="button">
					结算()
				</view>
			</view>

		</view>
		<view class="tabbar">
		</view>
		<tabBar :pagePath="'/pagesA/shopCar/shopCar'" :type='type'></tabBar>
	</view>
</template>

<script>
	/**
	 * @description xxx
	 *  @param {参数类型} 参数名称
	 * @return 没有返回信息写 void / 有返回信息 {返回类型} 描述信息
	 */
	import commonCar from "@/components/lebron-car/commonCar.vue"
	export default {
		components: {
			commonCar
		},
		data() {
			return {
				type: 1,
				goodsProducts: [{
					name: 'Koo Kee YoungTow Foo Mee 高记豆腐面',
					checked: 1,
					goods: [{
						img: '',
						title: 'Koo Kee Set Meal 高记招牌套餐',
						remark: 'Kway Teow Soup',
						price: '9.80',
						number: 1,
						checked: 1
					}, {
						img: '',
						title: 'Koo Kee Set Meal 高记招牌套餐',
						remark: 'Kway Teow Soup',
						price: '6.80',
						number: 1,
						checked: 1
					}]
				}],
			}
		},
		methods: {
			toBuyGoods() {
				console.log("点击去购买页面")
			},
			toNext() {
				console.log("点击下一步")
			}
		}
	}
</script>

<style lang="scss">
	image {
		width: 100%;
		height: 100%;
	}

	.cart .list {
		border: 1rpx solid #f2f2f2;
		display: flex;
		justify-content: space-between;
		padding: 20rpx;

		.left {
			width: 36rpx;
			height: 36rpx;
			align-self: center;
		}

		.right {
			flex: 0 0 90%;
			display: flex;
			justify-content: space-between;

			.image {
				width: 128rpx;
				height: 128rpx;

				image {
					border-radius: 10rpx;
				}
			}

			.information {
				flex: 0 0 76%;
				display: flex;
				flex-direction: column;
				justify-content: space-between;

				.name {
					font-size: 32rpx;
					color: rgba(0, 0, 0, 0.76);
				}

				.spec {
					color: #a6a097;
					font-size: 22rpx;
				}

				.price {
					color: #eb5940;
					font-size: 30rpx;
				}

			}
		}
	}

	.bottom {
		background-color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		padding: 20rpx;
		position: fixed;
		bottom: 98rpx;
		left: 0;
		border-top: 1rpx solid #f2f2f2;

		.left {
			display: flex;
			align-items: center;

			.image {
				width: 36rpx;
				height: 36rpx;
				margin-right: 10rpx;
			}
		}

		.right {
			display: flex;
			align-items: center;

			.button {
				width: 140rpx;
				height: 60rpx;
				border-radius: 50rpx;
				color: #FFFFFF;
				background-color: #f49c1c;
				display: flex;
				align-items: center;
				justify-content: center;
				margin-left: 20rpx;
			}

			.total text {
				color: #eb5940;
			}
		}

	}

	.tabbar {
		width: 750rpx;
		height: 220rpx;
	}
</style>
